package com.chinairi.mall.controller;


import com.chinairi.common.utils.ResponseUtil;
import com.chinairi.mall.model.StorageAddress;
import com.chinairi.mall.service.IStorageAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.chinairi.common.controller.BaseController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 库点主数据表 前端控制器
 * </p>
 *
 * @author Webgasd
 * @since 2020-10-13
 */
@RestController
@RequestMapping("/storage-address")
public class StorageAddressController extends BaseController {
    @Autowired
    private IStorageAddressService iStorageAddressService;

    /**
     * 根据搜索条件获取库点信息
     * @param storageAddress
     * @throws Exception
     */
    @GetMapping("/getStorageAddressList")
    public void getStorageAddressList(StorageAddress storageAddress) throws Exception {
        List<StorageAddress> list = iStorageAddressService.getStorageAddressList(storageAddress);
        ResponseUtil.showMessage("success", "获取库点信息成功", list);
    }
}
